/**
 * get post
 */
import qs from "querystring"

export function httpGet(url) {
    const result = fetch(url);
    return result
}


export function httpPost(url,pram) {
    const result = fetch(url, {
        method: "POST",
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded ',
            "Accept": "application/json,text/plain,*/*"
        },
        //自己字符串拼接方法
        body: qs.stringify(pram)
        // body:"user_id=iwen@qq.com&password=iwen123&verification_code=crfvw"
    }).then(res => res.json())
        .then(data => {
            console.log(data);


        })
        console.log()
    return result
}